{{useCss "app-pages/css/membership.scss"}}
<div class="membership">
    <div class="item">请领取您的专属会员卡</div>
    <div class="card">
        <div class="title">
            {{$Cache.membership.card.info.name}}
        </div>
        <div class="intro">
            {{$Cache.membership.card.info.intro}}
        </div>
    </div>
    {{#if $Cache.membership.own_current_card}}
    <br>
    <p>您已经拥有这张会员片</p>
    {{#else}}
    {{#if $Cache.membership.card.info.need_buy}}
        {{#if !$Cache.membership.ach}}
            <!-- 下单按钮 -->
            <mbPayMethod
                value="alipay.wap.auth.authAndExecute"
                text="支付宝"
                intro="使用支付宝网页支付"
                disabled="{{!(bus_info.info.alipay.seller_email&&bus_info.info.alipay.key&&bus_info.info.alipay.partner)}}"
            ></mbPayMethod>
            <mbPayMethod
                value="face_pay"
                text="当面付款"
                intro="最便捷的消费方式"
            ></mbPayMethod>
            {{#if $Top._is_weixin}}
            <mbPayMethod
                value="alipay.wap.auth.authAndExecute"
                text="微信支付"
                intro="在微信中直接使用微信进行支付"
                disabled="{{!(bus_info.info.wx_config.alipay.appId &&bus_info.info.wx_config.appSecret &&bus_info.info.wx_config.mchId &&bus_info.info.wx_config.Key )}}"
            ></mbPayMethod>
            {{/if}}
        {{/if}}
        {{#> "user_ach_controller","$Cache.membership.ach",$Cache.membership.ach}}
    {{#else}}
    <button event-click="{{'$Event.membership.add_card_to_user'}}">领取卡片</button>
    {{/if}}
    {{/if}}
</div>
<xmp type="tag" name="mbPayMethod">
    <button class="pay-type-wrap {{$Top.$Cache.membership.pay_method=='${value}'&&'checked'}}" event-click="{{'$Top.$Event.membership.go_buy_card'}}" ${__all_attrs__} >
        <div class="pay-type">
        ${text}
        </div>
    </button>
</xmp>
<style>
    .pay-type {
        margin: 5px 0;
    }
    .pay-type input {
        width: 11px;
        height: 11px;
        margin-right: 5px;
    }
    .pay-type span {
        margin-left: 55px;
        color: $silver;
    }
</style>
